import request from '@/config/axios'

export const getRoleListApi = () => {
  return request.get({
    url: '/1.1/classes/Roles'
    // params: {
    //   count: 1
    // }
  })
}

// 新增角色
export const postRoleListApi = (roleObj) => {
  return request.post({
    url: '/1.1/classes/Roles',
    data: {
      name: roleObj.name,
      userId: roleObj.userId,
      permission: roleObj.permission
    }
  })
}
// 获取角色
export const getRoleList = () => {
  return request.get({
    url: '/1.1/classes/Roles'
  })
}
// 新增用户
export const postRoleList = (data) => {
  return request.post({
    url: '/1.1/classes/users',
    data
  })
}
// 获取用户表

export const getUsers = () => {
  return request.get({
    url: '/1.1/classes/users'
  })
}
